import hyRequest from '../request'

export function getSearchConditions() {
    return hyRequest.get({
        url: "/search/top"
    })
}

export function getSearchHouse() {
    return hyRequest.get({
        url: "/search/result"
    })
}


const TSET_URL = "http://localhost:3000/api";
// const TSET_URL = "https://m.tujia.com/api";
const _apitsp = "1745822470702";
const _fasTraceId = "1745822470724jjmy7nJf_sFswaj63dhjJkxeNGfJBzaTxbndM_tnTYzQhmEJkH";

export function getGuessulike() {
    return hyRequest.post({
        url: TSET_URL + `/bnbapp-node-h5/h5/suggest/guessulike/bnb`,
        params: {
            _apitsp,
            _fasTraceId
        },
        data: {
            cityId: 48, keywordTryRecommend: 2
        }
    })
}

export function keywordsearchsuggest(keyword) {
    return hyRequest.post({
        url: TSET_URL + `/bnbapp-node-h5/h5/keyword/keywordsearchsuggest/bnb?_apitsp=${_apitsp}&_fasTraceId=${_fasTraceId}`,
        params: {
            _apitsp,
            _fasTraceId
        },
        data: {
            cityId: 48, // 城市 id
            keyword, // 搜索的关键字
            sourceCode: 702, // 源代码
        }
    })
}